home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 June: Reference Library / Dev.CD Jun 99 RL Disk 1.toast / Technical Documentation / Develop / develop Issue 23 / develop Issue 23 code / ProjectDrag 1.1b8.sea / ProjectDrag 1.1b8 / Sources / ProjectDrag Sources / ModifyReadOnly.r / ModifyReadOnly.r
Encoding:
Text File  |  1995-07-12  |  5.5 KB  |  197 lines  |  [TEXT/MPS ]

  1. /* ModifyReadOnly.r: ModifyReadOnly applet resources for ProjectDrag
  2.  *
  3.  * A set of applets for drag and drop source control by Tim Maroney.
  4.  * See develop, issue 23 for details.
  5.  *
  6.  * Built on DropShell by Leonard Rosenthol, Stephan Somogyi, and Marshall Clow,
  7.  * and using the MoreFiles utilities by Jim Luther.
  8.  *
  9.  * This software is free, but don't modify and redistribute it without
  10.  * changing the status window to indicate your name and your changes!
  11.  */
  12.  
  13. #define SystemSevenOrLater 1
  14. #include "Types.r"
  15. #include "SysTypes.r"
  16. #include "BalloonTypes.r"
  17. #include "AEUserTermTypes.r"
  18.  
  19. include "ModifyReadOnly.rsrc";
  20.  
  21. /* First thing we need is the Finder Help Balloon */
  22. resource 'hfdr' (-5696) {
  23.     HelpMgrVersion, 0, 0, 0,
  24.     {
  25.         HMStringItem {
  26.             "Drag a source file onto this icon, and ModifyReadOnly will let you "
  27.             "edit it without checking it out.",
  28.         },
  29.     }
  30. };
  31.  
  32.  
  33. /* Menus & Menu Help Resources  */
  34. resource 'MENU' (128, "Apple") { 128, textMenuProc, 0x7FFFFFFD, enabled, apple, 
  35.     {    /* array: 2 elements */
  36.         /* [1] */    "About ModifyReadOnly…", noIcon, noKey, noMark, plain,
  37.         /* [2] */    "-", noIcon, noKey, noMark, plain
  38.     }
  39. };
  40.  
  41. resource 'MENU' (129, "File") { 129, textMenuProc, allEnabled, enabled, "File", 
  42.     {    /* array: 2 elements */
  43.         /* [1] */    "Modify Read-only File…",    noIcon, "O", noMark, plain,
  44.         /* [2] */    "Quit",         noIcon, "Q", noMark, plain
  45.     }
  46. };
  47.  
  48. resource 'DITL' (128, purgeable) {
  49.     {    /* array DITLarray: 3 elements */
  50.         /* [1] */ {97, 198, 117, 270}, Button { enabled, "OK" }, 
  51.         /* [2] */ {8, 8, 87, 271}, StaticText { disabled,
  52.             "ModifyReadOnly - ProjectDrag's applet for modifying files without checking them out. "
  53.             " By Tim Maroney." },
  54.         /* [3] */ {0, 0, 0, 0}, HelpItem { disabled, HMScanhdlg { 1 } } 
  55.     }
  56. };
  57.  
  58. /* Here are the STR#'s that the Help text is stored in! */
  59. resource 'STR#' (128,purgeable) {    /* help items for Apple Menu */
  60.     { /* array StringArray: 3 elements */
  61.         /* [1] */     "The real scoop on ModifyReadOnly.",
  62.         /* [2] */     "Click here to dismiss this dialog.",
  63.         /* [3] */     "This text describes the product, its author, and why!"
  64.     }
  65. };
  66.  
  67. resource 'STR#' (129,purgeable) {    /* help items for File Menu */
  68.     { /* array StringArray: ? elements */
  69.         /* [1] */    "Use this menu to modify a read-only file and to exit ModifyReadOnly.",
  70.         /* [2] */     "Use this menu to modify a read-only file and to exit ModifyReadOnly. "
  71.                       "This menu is unavailable now.",
  72.         /* [3] */     "Use this menu to modify a read-only file and to exit ModifyReadOnly. "
  73.                     "This menu is unavailable until you respond to the alert box or dialog box.",
  74.         /* [4] */     "This command is unavailable until you respond to the alert box or dialog box.",
  75.         /* [5] */     "Use this command to modify a read-only file.",
  76.         /* [6] */     "Use this command to modify a read-only file. "
  77.                     "Not available now for some strange reason.",
  78.         /* [7] */     "Use this command to exit ModifyReadOnly.",
  79.         /* [8] */     "Use this command to exit ModifyReadOnly. "
  80.                     "Not available now for some strange reason."
  81.     }
  82. };
  83.  
  84. resource 'STR#' (200, purgeable) {    /* help info for the Error Dialog */
  85.     {    /* array StringArray: 3 elements */
  86.         /* [1] */    "Click here to dismiss this dialog.",
  87.         /* [2] */    "This text describes the error that occured.",
  88.         /* [3] */    "This error ID gives more specific details of the error."
  89.     }
  90. };
  91.  
  92. resource 'STR#' (2001, purgeable) {    /* progress info */
  93.     {    /* array StringArray: 2 elements */
  94.         /* [1] */    "marking “<1>” as modify-read-only",
  95.         /* [2] */    "reverting “<1>” to read-only"
  96.     }
  97. };
  98.  
  99. resource 'hmnu' (129, purgeable) {    /* File */
  100.     HelpMgrVersion, 0, 0, 0,
  101.     HMSkipItem {    /* no missing items */    },
  102.     {    /* array HMenuArray: 4 elements */
  103.         HMStringResItem {    /* Menu Title */
  104.             129, 1,
  105.             129, 2,
  106.             129, 3,
  107.             129, 4
  108.         },
  109.         HMStringResItem {    /* Open File… */
  110.             129, 5,
  111.             129, 6,
  112.             0, 0,
  113.             0, 0
  114.         },
  115.         HMStringResItem {    /* Quit */
  116.             129, 7,
  117.             129, 8,
  118.             0, 0,
  119.             0, 0
  120.         },
  121.     }
  122. };
  123.  
  124. resource 'BNDL' (128, "Bundle") {
  125.     'pdmr',
  126.     0,
  127.     {    /* array TypeArray: 2 elements */
  128.         /* [1] */
  129.         'ICN#',
  130.         {    /* array IDArray: 2 elements */
  131.             /* [1] */ 0, 128,
  132.             /* [2] */ 1, 0
  133.         },
  134.         /* [2] */
  135.         'FREF',
  136.         {    /* array IDArray: 2 elements */
  137.             /* [1] */ 0, 128,
  138.             /* [2] */ 1, 129
  139.         }
  140.     }
  141. };
  142.  
  143. data 'pdmr' (0) {
  144.     "ModifyReadOnly - Free software by Tim Maroney!"
  145. };
  146.  
  147. resource 'FREF' (128) { 'APPL', 0, "" }; 
  148. resource 'FREF' (129) { '****', 1, "" }; 
  149.  
  150.  
  151. /*
  152.     This is the KEY resource in supporting AEVTs - it is used by scripting/macro
  153.     systems such as Control Tower & QuicKeys in determing what events an application
  154.     supports.
  155.     
  156.     In this one, we simply tell it we support the required events, since that is all
  157.     we do.  If you add additional events, you MUST consult the AETE documentation
  158.     distributed by Apple.  Make sure you find the RELEASE NOTES, since this resource
  159.     has undergone a NUMBER of chanes.
  160. */
  161. resource 'aete' (0, "Apple Events Terminology") {
  162.  
  163.     0x00,            /* major version number in BCD */
  164.     0x90,            /* minor version number in BCD. From 7/9/91 version of AEUT docs */
  165.     english,        /* descriptions are in english */
  166.     roman,            /* use roman language script system */
  167.     
  168.     {    /* array Suites: 1 elements */
  169.     
  170.         /*******************************************************
  171.         [1] -- The part that show we do the required AppleEvents
  172.         *******************************************************/
  173.  
  174.         "Required Suite",
  175.         "Events that every application should support",
  176.         'reqd',
  177.         1,            /* suite level */
  178.         1,            /* suite version */
  179.         
  180.         {
  181.             /* array Events: 0 elements */
  182.         },
  183.         
  184.         {
  185.             /* array Classes: 0 elements */
  186.         },
  187.         
  188.         {
  189.             /* array ComparisonOps: 0 elements */
  190.         },
  191.         
  192.         {
  193.             /* array Enumerations: 0 elements */
  194.         },
  195.     }
  196. };
  197.